package com.witframework.web.tag.tab;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class panelTabTag extends BodyTagSupport  implements tabbedpanel{
  private String className = "cjdflttbcls";
  private String width = "90px";
  private String height = "30px";
  private String title = null;
  private int left = -1;
  private String activeBackgroundImage = null;
  private String inactiveBackgroundImage = null;

  public void setClassName(String paramString)  {
    this.className = paramString;
  }

  public String getClassName()  {
    return this.className;
  }

  public void setWidth(String paramString)  {
    this.width = paramString;
  }

  public String getWidth()  {
    return this.width;
  }

  public void setHeight(String paramString)  {
    this.height = paramString;
  }

  public String getHeight()  {
    return this.height;
  }

  public void setLeft(int paramInt)  {
    this.left = paramInt;
  }

  public int getLeft()  {
    return this.left;
  }

  public void setTitle(String paramString)  {
    this.title = paramString;
  }

  public String getTitle()  {
    return this.title;
  }

  public void setActiveBackgroundImage(String paramString)  {
    this.activeBackgroundImage = paramString;
  }

  public String getActiveBackgroundImage()  {
    return this.activeBackgroundImage;
  }

  public void setInactiveBackgroundImage(String paramString)  {
    this.inactiveBackgroundImage = paramString;
  }

  public String getInactiveBackgroundImage()  {
    return this.inactiveBackgroundImage;
  }

  public int doAfterBody()    throws JspException  {
    BodyContent localBodyContent = getBodyContent();
    String str = "";
    if (localBodyContent != null)
      str = localBodyContent.getString();
    panelTag localpanelTag = (panelTag)findAncestorWithClass(this, panelTag.class);
    if (localpanelTag == null)
      throw new JspException("tabpanel: Could not find ancestor for Tab");
    PanelTab localPanelTab = new PanelTab();
    localPanelTab.setContent(str.trim());
    localPanelTab.setClassName(this.className);
    localPanelTab.setWidth(this.width);
    localPanelTab.setHeight(this.height);
    localPanelTab.setLeft(this.left);
    if (this.title != null)
      localPanelTab.setTitle(this.title);
    if (this.activeBackgroundImage != null)
      localPanelTab.setActiveBackgroundImage(this.activeBackgroundImage);
    if (this.inactiveBackgroundImage != null)
      localPanelTab.setInactiveBackgroundImage(this.inactiveBackgroundImage);
    localpanelTag.setTab(localPanelTab);
    localBodyContent.clearBody();
    return 0;
  }

  public int doEndTag() {
    dropData();
    return 6;
  }
  public void release()  {
    dropData();
  }

  private void dropData()  {
    this.className = "cjdflttbcls";
    this.width = "90px";
    this.height = "30px";
    this.title = null;
    this.left = -1;
    this.activeBackgroundImage = null;
    this.inactiveBackgroundImage = null;
  }
}